package com.longge;

public class CorpFlightBookings {

    public int[] corpFlightBookings(int[][] bookings, int n) {
        int[] nums = new int[n];
        Difference difference = new Difference(nums);
        for (int[] booking : bookings) {
            int i = booking[0]-1;
            int j = booking[1]-1;
            int val = booking[2];
            difference.increment(i, j, val);
        }
        return  difference.result();
    }
}
